<template>
	<view class="px-2">
		<i-loading v-if="loading" />
		<i-news-list :resdata="newsList" @click="toShow" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				newsList:[
					{
						title      : '新闻',
						author     : '作者',
						createTime : '2020.09.05',
						imgs       : [],
						views      : 98052
					},
					{
						id         : 2, 
						title      : '新闻',
						author     : '作者',
						createTime : '2020.09.05',
						imgs       : [],
						views      : 8052
					},
					{
						title      : '新闻标题',
						author     : '作者',
						createTime : '2020.09.05',
						imgs       : [],
						views      : 62012
					},
				],
				loading:true
			}
		},
		onLoad() {
			setTimeout(() => {
				this.loading = false
			}, 1000)
		},
		methods: {
			toShow(item){
				uni.navigateTo({
					url:'/pages/notice/detail'
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #f8f8f8;
	}
</style>
